home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / resources / disk.i < prev    next >
Text File  |  1987-03-31  |  4KB  |  137 lines

  1.  
  2.         IFND    RESOURCES_DISK_I
  3. RESOURCES_DISK_I        SET     1
  4.  
  5. *****************************************************************
  6. *                                                               *
  7. * Copyright 1985, Commodore Amiga Inc.  All rights reserved.    *
  8. * No part of this program may be reproduced, transmitted,       *
  9. * transcribed, stored in retrieval system, or translated into   *
  10. * any language or computer language, in any form or by any      *
  11. * means, electronic, mechanical, magnetic, optical, chemical,   *
  12. * manual or otherwise, without the prior written permission of  *
  13. * Commodore Amiga Incorporated, 3350 Scott Blvd, Bld #7,        *
  14. * Santa Clara, CA 95051                                         *
  15. *                                                               *
  16. *****************************************************************
  17.  
  18.  
  19. *****************************************************************
  20. *
  21. * discresource.i -- external declarations for disc resources
  22. *
  23. * SOURCE CONTROL
  24. * ------ -------
  25. * $Header: disk.i,v 27.3 85/07/12 23:17:43 neil Exp $
  26. *
  27. * $Locker:  $
  28. *
  29. *****************************************************************
  30.  
  31.         IFND    EXEC_TYPES_I
  32.         INCLUDE "exec/types.i"
  33.         ENDC    !EXEC_TYPES_I
  34.  
  35.         IFND    EXEC_LISTS_I
  36.         INCLUDE "exec/lists.i"
  37.         ENDC    !EXEC_LISTS_I
  38.  
  39.         IFND    EXEC_PORTS_I
  40.         INCLUDE "exec/ports.i"
  41.         ENDC    !EXEC_PORTS_I
  42.  
  43.         IFND    EXEC_INTERRUPTS_I
  44.         INCLUDE "exec/interrupts.i"
  45.         ENDC    !EXEC_INTERRUPTS_I
  46.  
  47.         IFND    EXEC_LIBRARIES_I
  48.         INCLUDE "exec/libraries.i"
  49.         ENDC    !EXEC_LIBRARIES_I
  50.  
  51.  
  52. *********************************************************************
  53. *
  54. * Resource structures
  55. *
  56. *********************************************************************
  57.  
  58.     STRUCTURE DISCRESOURCEUNIT,MN_SIZE
  59.         STRUCT  DRU_DISCBLOCK,IS_SIZE
  60.         STRUCT  DRU_DISCSYNC,IS_SIZE
  61.         STRUCT  DRU_INDEX,IS_SIZE
  62.         LABEL   DRU_SIZE
  63.  
  64.  
  65.  
  66.     STRUCTURE DISCRESOURCE,LIB_SIZE
  67.         APTR    DR_CURRENT      ; pointer to current unit structure
  68.         UBYTE   DR_FLAGS
  69.         UBYTE   DR_pad
  70.         APTR    DR_SYSLIB
  71.         APTR    DR_CIARESOURCE
  72.         STRUCT  DR_UNITID,4*4
  73.         STRUCT  DR_WAITING,LH_SIZE
  74.         STRUCT  DR_DISCBLOCK,IS_SIZE
  75.         STRUCT  DR_DISCSYNC,IS_SIZE
  76.         STRUCT  DR_INDEX,IS_SIZE
  77.         LABEL   DR_SIZE
  78.  
  79.         BITDEF  DR,ALLOC0,0     ; unit zero is allocated
  80.         BITDEF  DR,ALLOC1,1     ; unit one is allocated
  81.         BITDEF  DR,ALLOC2,2     ; unit two is allocated
  82.         BITDEF  DR,ALLOC3,3     ; unit three is allocated
  83.         BITDEF  DR,ACTIVE,7     ; is the disc currently busy?
  84.  
  85.  
  86. *********************************************************************
  87. *
  88. * Hardware Magic
  89. *
  90. *********************************************************************
  91.  
  92.  
  93. DSKDMAOFF       EQU     $4000   ; idle command for dsklen register
  94.  
  95.  
  96. *********************************************************************
  97. *
  98. * Resource specific commands
  99. *
  100. *********************************************************************
  101.  
  102. *-- DR_NAME is a generic macro to get the name of the resource.  This
  103. *-- way if the name is ever changed you will pick up the change
  104. *-- automatically.
  105. *--
  106. *-- Normal usage would be:
  107. *--
  108. *-- internalName:       DISKNAME
  109. *--
  110.  
  111. DISKNAME:       MACRO
  112.                 DC.B    'disk.resource',0
  113.                 DS.W    0
  114.                 ENDM
  115.  
  116.         LIBINIT LIB_BASE
  117.         LIBDEF  DR_ALLOCUNIT
  118.         LIBDEF  DR_FREEUNIT
  119.         LIBDEF  DR_GETUNIT
  120.         LIBDEF  DR_GIVEUNIT
  121.         LIBDEF  DR_GETUNITID
  122.  
  123. DR_LASTCOMM     EQU     DR_GIVEUNIT
  124.  
  125.  
  126. *********************************************************************
  127. *
  128. * drive types
  129. *
  130. *********************************************************************
  131.  
  132. DRT_AMIGA       EQU     $00000000
  133. DRT_37422D2S    EQU     $55555555
  134. DRT_EMPTY       EQU     $FFFFFFFF
  135.  
  136.         ENDC
  137.